package com.intelligence.openfeign.service.deivce;

import com.intelligence.entity.pojo.DeviceLog;
import com.intelligence.entity.pojo.MonpointsDevice;
import com.intelligence.entity.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * deviceLog的openFeign调用接口
 *
 * @Author : RulerWood
 * @Data : 2024/6/3 - 15:37
 */
@FeignClient(value = "system-device", contextId = "monpointsDevice", path = "/device/monpointsDevice")
public interface MonpointsDeviceFeignService {

    @GetMapping("/listMonpointsDevice")
    Result<List<MonpointsDevice>> listMonpointsDevice();

    @GetMapping("/listByMidMonpointsDevice")
    Result<List<MonpointsDevice>> listByMidMonpointsDevice(@RequestParam(value = "mid") Integer mid);

    @GetMapping("/getMonpointsDevice/{id}")
    Result<MonpointsDevice> getMonpointsDevice(@PathVariable(value = "id") Long id);

    /**
     * 数据的新增
     *
     * @param monpointsDevice 保存对象
     * @return
     */
    @PostMapping("/saveMonpointsDevice")
    Result saveMonpointsDevice(@RequestBody MonpointsDevice monpointsDevice);

    /**
     * 数据的修改
     *
     * @param monpointsDevice 修改对象
     * @return
     */
    @PutMapping("/updateMonpointsDevice")
    Result updateMonpointsDevice(@RequestBody MonpointsDevice monpointsDevice);

    /**
     * 删除某条数据
     *
     * @param id 数据主键
     * @return
     */
    @DeleteMapping("/deleteMonpointsDevice/{id}")
    Result deleteMonpointsDevice(@PathVariable(value = "id") Integer id);

}
